import { createApp } from 'vue'
import App from './App.vue';
// import Vue from 'vue';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import 'assets/style/base.css'
import axios from "axios";
import * as ElIconModules from '@element-plus/icons-vue'
import router from "./router";
import store from "./store"
import message from "components/message";
import has from "./utils/directive/has"
const app = createApp(App).use(ElementPlus).use(router).use(store).use(message).use(has)
// 批量注册icon
for (const iconName in ElIconModules) {
  app.component(iconName.replace(/[A-Z]/g,function(str){
    return '-'+str.toLowerCase()
  }).replace(/-/,""),ElIconModules[iconName])
}
app.config.globalProperties.$axios = axios
app.mount('#app')